home *** CD-ROM | disk | FTP | other *** search
- #ifndef GAME_H
- #define GAME_H
-
- class game_piece {
-
- public:
- virtual void position (); // notice the keyword virtual
- virtual void move (); // preceeding these member functions.
- private:
- int x_coord;
- int y_coord;
- };
-
- class pawn : public game_piece {
-
- public:
- pawn ();
- ~pawn ();
- void position (); // derived class implementations of
- void move (); // base class virtual functions.
- };
-
- class bishop : public game_piece {
-
- public:
- bishop ();
- ~bishop ();
- void position (); // derived class implementations of
- void move (); // base class virtual functions.
- };
-
- class rook : public game_piece {
-
- public:
- rook ();
- ~rook ();
- void position (); // derived class implementations of
- void move (); // base class virtual functions.
- };
-
- class king : public game_piece {
-
- public:
- king ();
- ~king ();
- void position (); // derived class implementations of
- void move (); // base class virtual functions.
- };
-
- #endif // GAME_H
-